﻿using System;

namespace Synergy.SharePoint.Configuration
{
	/// <summary>
	/// Base class for a configuration section metadata definition.
	/// </summary>
	public abstract class ConfigurationSectionBase
	{
		/// <summary>
		/// Initializes a new instance of the <see cref="ConfigurationSectionBase"/> class.
		/// </summary>
		/// <param name="name">The name.</param>
		/// <param name="type">The type.</param>
		protected ConfigurationSectionBase(string name, Type type) : this(name, (type == null) ? null : type.AssemblyQualifiedName)
		{}
		
		
		/// <summary>
		/// Initializes a new instance of the <see cref="ConfigurationSectionBase"/> class.
		/// </summary>
		/// <param name="name">The name.</param>
		/// <param name="type">The type.</param>
		protected ConfigurationSectionBase(string name, string type)
		{
			Name = name;
			Type = type;
		}


		/// <summary>
		/// Gets or sets the name of the configuration section.
		/// </summary>
		/// <value>The name.</value>
		public string Name { get; set; }


		/// <summary>
		/// Gets or sets the type that will render the configuration section.
		/// </summary>
		/// <value>The type.</value>
		public string Type { get; set; }
	}
}